#!/usr/bin/env python
# -*- coding:utf-8 -*-

import pickle
import shelve


def pickle01():
    integers = [1, 2, 3, 4, 5]
    f = open("22901.dat", "wb")
    pickle.dump(integers, f)
    f.close()


def shelve02():
    s = shelve.open("22901.db")
    s["name"] = "www.itdiffer.com"
    s["contents"] = {"first": "base knowledge", "second": "day day up"}
    s.close()


if __name__ == '__main__':
    pickle01()
